package sng.modules.model
{
	import mx.collections.ArrayCollection;
	import mx.core.Application;
	import mx.rpc.IResponder;
	
	import org.puremvc.as3.interfaces.IProxy;
	import org.puremvc.as3.patterns.proxy.Proxy;
	
	import sng.modules.system.SocialSystem;
	import sng.net.rpc.GameRPC;
	
	public class SocialProxy extends Proxy implements IProxy, IResponder
	{
		public function SocialProxy()
		{
			super(SocialSystem.SocialProxyName);
		}
		
		
		
		public function result(rpcEvent:Object):void
		{
			data = rpcEvent.result.friends.friend as ArrayCollection;
			sendNotification(SocialSystem.SocialFriendsDataComplete, data);
		}
		
		public function fault(info:Object):void
		{
		}
		
		//获取好友列表数据，目前统一走rpc接口
		public function getFriendsListData():void
		{
			var gameRpc:GameRPC = new GameRPC("conf/Friends.xml", this);
			gameRpc.load();
		}
	}
}